package cn.appsys.service;

import cn.appsys.pojo.Info;
import cn.appsys.pojo.Version;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InfoService {
    List<Info> getAll(@Param("softwareName") String softwareName, @Param("status") Long status,
                      @Param("flatformId") Long flatformId, @Param("devId") Long devId,
                      @Param("categoryLevel1") Long categoryLevel1, @Param("categoryLevel2") Long categoryLevel2,
                      @Param("categoryLevel3") Long categoryLevel3, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

    Integer getCount(@Param("softwareName") String softwareName, @Param("status") Long status,
                     @Param("flatformId") Long flatformId, @Param("devId") Long devId,
                     @Param("categoryLevel1") Long categoryLevel1, @Param("categoryLevel2") Long categoryLevel2,
                     @Param("categoryLevel3") Long categoryLevel3);

    Integer addInfo(Info info);

    Info getInfoById(@Param("id") Long id);

    Info checkApkName(@Param("apkName") String apkName);

    Integer updateInfo(Info info);

    Integer updatePicBeNull(@Param("id") Long id, String logoLocPath) throws Exception;

    Integer updateVersionId(Long id, Long versionId);

    Integer delInfo(@Param("id") Long id, List<Version> versionList) throws Exception;

    Integer updateStatus(@Param("id") Long id, @Param("status") Long status);
}
